import { axios } from './request'

// showManage组件请求所有剧目请求
export function getshowinfo (tstart, tend) {
  return axios({
    url: '/getallshow',
    method: 'GET',
    params: {
      star: tstart,
      end: tend
    }
  })
}

// showManage子组件获取级联选择器数据请求
export function getLocations () {
  return axios({
    url: '/getlocation',
    method: 'GET'
  })
}

// showManage子组件通过级联选择器获取seatmap请求
export function postshowseatmap (tpath, tid) {
  return axios({
    url: '/addshowseatmap',
    method: 'POST',
    data: {
      'path': tpath,
      'id': tid
    }
  })
}

// showManage子组件确定修改发送数据事件
export function postshowinfo (showinfo) {
  return axios({
    url: '/changeshow',
    method: 'POST',
    data: showinfo
  })
}

// showManage子组件添加新演出事件
export function postnewshowinfo (newshowinfo) {
  return axios({
    url: '/addnewshow',
    method: 'POST',
    data: newshowinfo
  })
}

// showManage页面的搜索事件
export function postsearchshow (search, tstar, tend) {
  return axios({
    url: '/searchshow',
    method: 'POST',
    data: {
      search: search,
      star: tstar,
      end: tend
    }
  })
}
